Optimal. Leaf size=195 \[ -\frac {B n}{16 b (a+b x)^4}+\frac {B d n}{12 b (b c-a d) (a+b x)^3}-\frac {B d^2 n}{8 b (b c-a d)^2 (a+b x)^2}+\frac {B d^3 n}{4 b (b c-a d)^3 (a+b x)}+\frac {B d^4 n \log (a+b x)}{4 b (b c-a d)^4}-\frac {B d^4 n \log (c+d x)}{4 b (b c-a d)^4}-\frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{4 b (a+b x)^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 195, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {2548, 46}
\begin {gather*} -\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A}{4 b (a+b x)^4}+\frac {B d^4 n \log (a+b x)}{4 b (b c-a d)^4}-\frac {B d^4 n \log (c+d x)}{4 b (b c-a d)^4}+\frac {B d^3 n}{4 b (a+b x) (b c-a d)^3}-\frac {B d^2 n}{8 b (a+b x)^2 (b c-a d)^2}+\frac {B d n}{12 b (a+b x)^3 (b c-a d)}-\frac {B n}{16 b (a+b x)^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 2548
Rubi steps
\begin {align*} \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^5} \, dx &=\int \left (\frac {A}{(a+b x)^5}+\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^5}\right ) \, dx\\ &=-\frac {A}{4 b (a+b x)^4}+B \int \frac {\log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^5} \, dx\\ &=-\frac {A}{4 b (a+b x)^4}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{4 b (a+b x)^4}+\frac {(B (b c-a d) n) \int \frac {1}{(a+b x)^5 (c+d x)} \, dx}{4 b}\\ &=-\frac {A}{4 b (a+b x)^4}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{4 b (a+b x)^4}+\frac {(B (b c-a d) n) \int \left (\frac {b}{(b c-a d) (a+b x)^5}-\frac {b d}{(b c-a d)^2 (a+b x)^4}+\frac {b d^2}{(b c-a d)^3 (a+b x)^3}-\frac {b d^3}{(b c-a d)^4 (a+b x)^2}+\frac {b d^4}{(b c-a d)^5 (a+b x)}-\frac {d^5}{(b c-a d)^5 (c+d x)}\right ) \, dx}{4 b}\\ &=-\frac {A}{4 b (a+b x)^4}-\frac {B n}{16 b (a+b x)^4}+\frac {B d n}{12 b (b c-a d) (a+b x)^3}-\frac {B d^2 n}{8 b (b c-a d)^2 (a+b x)^2}+\frac {B d^3 n}{4 b (b c-a d)^3 (a+b x)}+\frac {B d^4 n \log (a+b x)}{4 b (b c-a d)^4}-\frac {B d^4 n \log (c+d x)}{4 b (b c-a d)^4}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{4 b (a+b x)^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.19, size = 160, normalized size = 0.82 \begin {gather*} \frac {\frac {12 B d^4 n \log (a+b x)}{(b c-a d)^4}-\frac {12 B d^4 n \log (c+d x)}{(b c-a d)^4}+\frac {-12 A-3 B n+\frac {4 B d n (a+b x)}{b c-a d}-\frac {6 B d^2 n (a+b x)^2}{(b c-a d)^2}+\frac {12 B d^3 n (a+b x)^3}{(b c-a d)^3}-12 B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^4}}{48 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.39, size = 2583, normalized size = 13.25
method | result | size |
risch | \(\text {Expression too large to display}\) | \(2583\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 621 vs.
\(2 (182) = 364\).
time = 0.36, size = 621, normalized size = 3.18 \begin {gather*} \frac {1}{48} \, {\left (\frac {12 \, d^{4} n e \log \left (b x + a\right )}{b^{5} c^{4} - 4 \, a b^{4} c^{3} d + 6 \, a^{2} b^{3} c^{2} d^{2} - 4 \, a^{3} b^{2} c d^{3} + a^{4} b d^{4}} - \frac {12 \, d^{4} n e \log \left (d x + c\right )}{b^{5} c^{4} - 4 \, a b^{4} c^{3} d + 6 \, a^{2} b^{3} c^{2} d^{2} - 4 \, a^{3} b^{2} c d^{3} + a^{4} b d^{4}} + \frac {12 \, b^{3} d^{3} n x^{3} e - 6 \, {\left (b^{3} c d^{2} n - 7 \, a b^{2} d^{3} n\right )} x^{2} e + 4 \, {\left (b^{3} c^{2} d n - 5 \, a b^{2} c d^{2} n + 13 \, a^{2} b d^{3} n\right )} x e - {\left (3 \, b^{3} c^{3} n - 13 \, a b^{2} c^{2} d n + 23 \, a^{2} b c d^{2} n - 25 \, a^{3} d^{3} n\right )} e}{a^{4} b^{4} c^{3} - 3 \, a^{5} b^{3} c^{2} d + 3 \, a^{6} b^{2} c d^{2} - a^{7} b d^{3} + {\left (b^{8} c^{3} - 3 \, a b^{7} c^{2} d + 3 \, a^{2} b^{6} c d^{2} - a^{3} b^{5} d^{3}\right )} x^{4} + 4 \, {\left (a b^{7} c^{3} - 3 \, a^{2} b^{6} c^{2} d + 3 \, a^{3} b^{5} c d^{2} - a^{4} b^{4} d^{3}\right )} x^{3} + 6 \, {\left (a^{2} b^{6} c^{3} - 3 \, a^{3} b^{5} c^{2} d + 3 \, a^{4} b^{4} c d^{2} - a^{5} b^{3} d^{3}\right )} x^{2} + 4 \, {\left (a^{3} b^{5} c^{3} - 3 \, a^{4} b^{4} c^{2} d + 3 \, a^{5} b^{3} c d^{2} - a^{6} b^{2} d^{3}\right )} x}\right )} B e^{\left (-1\right )} - \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right )}{4 \, {\left (b^{5} x^{4} + 4 \, a b^{4} x^{3} + 6 \, a^{2} b^{3} x^{2} + 4 \, a^{3} b^{2} x + a^{4} b\right )}} - \frac {A}{4 \, {\left (b^{5} x^{4} + 4 \, a b^{4} x^{3} + 6 \, a^{2} b^{3} x^{2} + 4 \, a^{3} b^{2} x + a^{4} b\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 772 vs.
\(2 (182) = 364\).
time = 0.37, size = 772, normalized size = 3.96 \begin {gather*} -\frac {12 \, {\left (A + B\right )} b^{4} c^{4} - 48 \, {\left (A + B\right )} a b^{3} c^{3} d + 72 \, {\left (A + B\right )} a^{2} b^{2} c^{2} d^{2} - 48 \, {\left (A + B\right )} a^{3} b c d^{3} + 12 \, {\left (A + B\right )} a^{4} d^{4} - 12 \, {\left (B b^{4} c d^{3} - B a b^{3} d^{4}\right )} n x^{3} + 6 \, {\left (B b^{4} c^{2} d^{2} - 8 \, B a b^{3} c d^{3} + 7 \, B a^{2} b^{2} d^{4}\right )} n x^{2} - 4 \, {\left (B b^{4} c^{3} d - 6 \, B a b^{3} c^{2} d^{2} + 18 \, B a^{2} b^{2} c d^{3} - 13 \, B a^{3} b d^{4}\right )} n x + {\left (3 \, B b^{4} c^{4} - 16 \, B a b^{3} c^{3} d + 36 \, B a^{2} b^{2} c^{2} d^{2} - 48 \, B a^{3} b c d^{3} + 25 \, B a^{4} d^{4}\right )} n - 12 \, {\left (B b^{4} d^{4} n x^{4} + 4 \, B a b^{3} d^{4} n x^{3} + 6 \, B a^{2} b^{2} d^{4} n x^{2} + 4 \, B a^{3} b d^{4} n x - {\left (B b^{4} c^{4} - 4 \, B a b^{3} c^{3} d + 6 \, B a^{2} b^{2} c^{2} d^{2} - 4 \, B a^{3} b c d^{3}\right )} n\right )} \log \left (b x + a\right ) + 12 \, {\left (B b^{4} d^{4} n x^{4} + 4 \, B a b^{3} d^{4} n x^{3} + 6 \, B a^{2} b^{2} d^{4} n x^{2} + 4 \, B a^{3} b d^{4} n x - {\left (B b^{4} c^{4} - 4 \, B a b^{3} c^{3} d + 6 \, B a^{2} b^{2} c^{2} d^{2} - 4 \, B a^{3} b c d^{3}\right )} n\right )} \log \left (d x + c\right )}{48 \, {\left (a^{4} b^{5} c^{4} - 4 \, a^{5} b^{4} c^{3} d + 6 \, a^{6} b^{3} c^{2} d^{2} - 4 \, a^{7} b^{2} c d^{3} + a^{8} b d^{4} + {\left (b^{9} c^{4} - 4 \, a b^{8} c^{3} d + 6 \, a^{2} b^{7} c^{2} d^{2} - 4 \, a^{3} b^{6} c d^{3} + a^{4} b^{5} d^{4}\right )} x^{4} + 4 \, {\left (a b^{8} c^{4} - 4 \, a^{2} b^{7} c^{3} d + 6 \, a^{3} b^{6} c^{2} d^{2} - 4 \, a^{4} b^{5} c d^{3} + a^{5} b^{4} d^{4}\right )} x^{3} + 6 \, {\left (a^{2} b^{7} c^{4} - 4 \, a^{3} b^{6} c^{3} d + 6 \, a^{4} b^{5} c^{2} d^{2} - 4 \, a^{5} b^{4} c d^{3} + a^{6} b^{3} d^{4}\right )} x^{2} + 4 \, {\left (a^{3} b^{6} c^{4} - 4 \, a^{4} b^{5} c^{3} d + 6 \, a^{5} b^{4} c^{2} d^{2} - 4 \, a^{6} b^{3} c d^{3} + a^{7} b^{2} d^{4}\right )} x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 710 vs.
\(2 (182) = 364\).
time = 4.65, size = 710, normalized size = 3.64 \begin {gather*} \frac {B d^{4} n \log \left (b x + a\right )}{4 \, {\left (b^{5} c^{4} - 4 \, a b^{4} c^{3} d + 6 \, a^{2} b^{3} c^{2} d^{2} - 4 \, a^{3} b^{2} c d^{3} + a^{4} b d^{4}\right )}} - \frac {B d^{4} n \log \left (d x + c\right )}{4 \, {\left (b^{5} c^{4} - 4 \, a b^{4} c^{3} d + 6 \, a^{2} b^{3} c^{2} d^{2} - 4 \, a^{3} b^{2} c d^{3} + a^{4} b d^{4}\right )}} - \frac {B n \log \left (b x + a\right )}{4 \, {\left (b^{5} x^{4} + 4 \, a b^{4} x^{3} + 6 \, a^{2} b^{3} x^{2} + 4 \, a^{3} b^{2} x + a^{4} b\right )}} + \frac {B n \log \left (d x + c\right )}{4 \, {\left (b^{5} x^{4} + 4 \, a b^{4} x^{3} + 6 \, a^{2} b^{3} x^{2} + 4 \, a^{3} b^{2} x + a^{4} b\right )}} + \frac {12 \, B b^{3} d^{3} n x^{3} - 6 \, B b^{3} c d^{2} n x^{2} + 42 \, B a b^{2} d^{3} n x^{2} + 4 \, B b^{3} c^{2} d n x - 20 \, B a b^{2} c d^{2} n x + 52 \, B a^{2} b d^{3} n x - 3 \, B b^{3} c^{3} n + 13 \, B a b^{2} c^{2} d n - 23 \, B a^{2} b c d^{2} n + 25 \, B a^{3} d^{3} n - 12 \, A b^{3} c^{3} - 12 \, B b^{3} c^{3} + 36 \, A a b^{2} c^{2} d + 36 \, B a b^{2} c^{2} d - 36 \, A a^{2} b c d^{2} - 36 \, B a^{2} b c d^{2} + 12 \, A a^{3} d^{3} + 12 \, B a^{3} d^{3}}{48 \, {\left (b^{8} c^{3} x^{4} - 3 \, a b^{7} c^{2} d x^{4} + 3 \, a^{2} b^{6} c d^{2} x^{4} - a^{3} b^{5} d^{3} x^{4} + 4 \, a b^{7} c^{3} x^{3} - 12 \, a^{2} b^{6} c^{2} d x^{3} + 12 \, a^{3} b^{5} c d^{2} x^{3} - 4 \, a^{4} b^{4} d^{3} x^{3} + 6 \, a^{2} b^{6} c^{3} x^{2} - 18 \, a^{3} b^{5} c^{2} d x^{2} + 18 \, a^{4} b^{4} c d^{2} x^{2} - 6 \, a^{5} b^{3} d^{3} x^{2} + 4 \, a^{3} b^{5} c^{3} x - 12 \, a^{4} b^{4} c^{2} d x + 12 \, a^{5} b^{3} c d^{2} x - 4 \, a^{6} b^{2} d^{3} x + a^{4} b^{4} c^{3} - 3 \, a^{5} b^{3} c^{2} d + 3 \, a^{6} b^{2} c d^{2} - a^{7} b d^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.33, size = 555, normalized size = 2.85 \begin {gather*} -\frac {\frac {12\,A\,a^3\,d^3-12\,A\,b^3\,c^3+25\,B\,a^3\,d^3\,n-3\,B\,b^3\,c^3\,n+36\,A\,a\,b^2\,c^2\,d-36\,A\,a^2\,b\,c\,d^2+13\,B\,a\,b^2\,c^2\,d\,n-23\,B\,a^2\,b\,c\,d^2\,n}{12\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3\right )}+\frac {d\,x\,\left (13\,B\,n\,a^2\,b\,d^2-5\,B\,n\,a\,b^2\,c\,d+B\,n\,b^3\,c^2\right )}{3\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3\right )}-\frac {d^2\,x^2\,\left (B\,b^3\,c\,n-7\,B\,a\,b^2\,d\,n\right )}{2\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3\right )}+\frac {B\,b^3\,d^3\,n\,x^3}{a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3}}{4\,a^4\,b+16\,a^3\,b^2\,x+24\,a^2\,b^3\,x^2+16\,a\,b^4\,x^3+4\,b^5\,x^4}-\frac {B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )}{4\,b\,\left (a^4+4\,a^3\,b\,x+6\,a^2\,b^2\,x^2+4\,a\,b^3\,x^3+b^4\,x^4\right )}-\frac {B\,d^4\,n\,\mathrm {atanh}\left (\frac {-4\,a^4\,b\,d^4+8\,a^3\,b^2\,c\,d^3-8\,a\,b^4\,c^3\,d+4\,b^5\,c^4}{4\,b\,{\left (a\,d-b\,c\right )}^4}-\frac {2\,b\,d\,x\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3\right )}{{\left (a\,d-b\,c\right )}^4}\right )}{2\,b\,{\left (a\,d-b\,c\right )}^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________